﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommonUtils
{
	public class ExceptionEventArgs : EventArgs
	{
		public ExceptionEventArgs(Exception ex) { Exception = ex; }
		public Exception Exception { get; set; }
	}
	public class MessageEventArgs : EventArgs
	{
		public MessageEventArgs(string inMessage, int inLevel, int inThreshold) { Message = inMessage; Level = inLevel; Threshold = inThreshold; }
		public string Message { get; set; }
		public int Level { get; set; }
		public int Threshold { get; set; }
	}
	public delegate void ExceptionEventHandler(object sender, ExceptionEventArgs e);
	public delegate void MessageEventHandler(object sender, MessageEventArgs e);
	public interface IBaseLib
	{
		#region methods
		void OnException(ExceptionEventArgs e);
		void OnMessage(MessageEventArgs e);
		#endregion methods

		#region events
		event ExceptionEventHandler ExceptionEvent;
		event MessageEventHandler MessageEvent;
		#endregion events
	}
}
